<template>
  <router-view />
</template>

<script setup>
import { onMounted } from 'vue';
import { getSetting } from '@/utils/system';

onMounted(() => {
  getSetting().then(setting => {
    document.title = setting.portalTitle || '门户';

    if (setting.portalCss) {
      let style = document.createElement("style");
      style.textContent = setting.portalCss;
      document.head.appendChild(style);
    }
  });
});
</script>

<style>
#app {
  background: #eee;
  box-sizing: border-box;
}
</style>